home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / 3C90X / OEMSETUP.INF < prev   
INI File  |  1996-07-31  |  34KB  |  905 lines

  1. ; -----------------------------------------------------------------------
  2. ; OEMSETUP file for 3Com 3C90x EtherLink XL adapters.
  3. ; Copyright 1994-1996 3Com Corporation.  All rights reserved.
  4. ; -----------------------------------------------------------------------
  5. ;
  6. ; OS: Windows NT Version 3.5
  7. ; Platform type: Intel x86
  8. ;
  9. ; Supported adapters:
  10. ; -------------------
  11. ; 3Com Fast EtherLink XL (3C905)
  12. ; 3Com EtherLink XL (3C900)
  13. ;
  14. ; Usage:
  15. ;
  16. ;   This file is used for the installation/configuration/deinstallation
  17. ;   procedure of EtherLink XL drivers for Windows NT. 
  18. ;
  19. ; Current Version: %VER 1.0c
  20. ;
  21. ; History:
  22. ;   v1.0a   {CDL): Initial version, from modified Vortex file
  23. ;   v1.0b   {CDL): Fixed some problems with finding and copying
  24. ;                  driver (.SYS) file
  25. ;   v1.0c   {CDL): Fixed problem finding file for update operation and
  26. ;                  added support for COMBO adapter
  27. ;
  28. ;------------------------------------------------------------------------
  29.  
  30. [Identification]
  31.     OptionType = NetAdapter
  32.  
  33. [PlatformsSupported]
  34. ;    ISA
  35. ;    EISA
  36. ;    "Jazz-Internal Bus"
  37.     PCI
  38.  
  39. [Options]
  40.     3C905   ; 10/100Mb Fast EtherLink XL 
  41.     3C900   ; 10Mb EtherLink XL
  42.  
  43. [FileConstants]
  44.     UtilityInf                  = "UTILITY.INF"
  45.     subroutineinf               = "SUBROUTN.INF"
  46.     SoftwareType                = "driver"
  47.     Exit_Code                   = 0
  48.     NetEventDLL                 = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\el90x.sys"
  49.     IoLogMsgDLL                 = "%SystemRoot%\System32\IoLogMsg.dll"
  50.  
  51.     Manufacturer                = "3Com"
  52.     ProductMajorVersion         = "1"
  53.     ProductMinorVersion         = "0"
  54.     ProductVersion              = $(ProductMajorVersion)"."$(ProductMinorVersion)
  55.     ProductSoftwareName         = "El90x"
  56.     ProductSoftwareImagePath    = "%SystemRoot%\System32\drivers\el90x.sys"
  57.     NetRuleSoftwareType         = "El90xSys ndisDriver El90xDriver"
  58.     NetRuleSoftwareUse          = $(SoftwareType)
  59.     NetRuleSoftwareBindForm     = """El90xSys"" yes no container"
  60.     NetRuleSoftwareClass        = {"El90xDriver basic"}
  61.     NetRuleSoftwareBindable     = {"El90xDriver El90xAdapter non exclusive 100"}
  62.     ProductHardwareName         = "El90x"
  63.     NetRuleHardwareBindForm     = " yes yes container"
  64.  
  65.     ProductKeyName              = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  66.     ParamKeyName                = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  67.  
  68.     FunctionTitle               = "3Com 3C90x Adapter Card Setup"
  69.     ProductSoftwareDescription  = "3Com 3C90x Adapter Driver"
  70.     ProductSoftwareTitle        = "3Com 3C90x Adapter Driver"
  71.  
  72.     ProductHardware3C905Title   = "3Com Fast EtherLink XL Adapter (3C905)"
  73.     ProductHardware3C905Description = "3Com Fast EtherLink XL PCI 10/100Mb Adapter (3C905)"
  74.     NetRuleHardware3C905Type    = "El90x El90xAdapter"
  75.     NetRuleHardware3C905Class   = {"El90xAdapter basic"}
  76.  
  77.     ProductHardware3C900Title   = "3Com EtherLink XL Adapter (3C900)"
  78.     ProductHardware3C900Description = "3Com EtherLink XL PCI 10Mb Adapter (3C900)" 
  79.     NetRuleHardware3C900Type    = "El90x El90xAdapter"
  80.     NetRuleHardware3C900Class   = {"El90xAdapter basic"}
  81.  
  82.     Adapter3C905Type            = 5             ;; PCI board
  83.     Adapter3C900Type            = 5             ;; PCI board
  84.     3C905CFIDList               = {36944}       ;; 0x9050
  85.     3C900CFIDList               = {36864, 36865}  ;; 0x9000, 0x9001
  86.  
  87. [GeneralConstants]
  88.     from      = ""
  89.     to    = ""
  90.     ExitCodeOk     = 0
  91.     ExitCodeCancel = 1                
  92.     ExitCodeFatal  = 2
  93.     KeyNull     = ""
  94.     MAXIMUM_ALLOWED   = 33554432
  95.     RegistryErrorIndex = NO_ERROR
  96.     KeyProduct  = ""
  97.     KeyParameters   = ""
  98.     TRUE        = 1
  99.     FALSE       = 0
  100.     NoTitle        = 0
  101.     ExitState   = "Active"
  102.     OldVersionExisted = $(FALSE)
  103.     DriverPath  = $(!STF_NTPATH)\drivers
  104.     NT350VersionConstant = "3.50"
  105.     NT310VersionConstant = "3.10"
  106.  
  107. [date]
  108.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  109.  
  110. [Identify]
  111.     read-syms Identification
  112.     set Status     = STATUS_SUCCESSFUL
  113.     set Identifier = $(OptionType)
  114.     set Media      = #("Source Media Descriptions", 1, 1)
  115.     Return $(Status) $(Identifier) $(Media)
  116.  
  117. [ReturnOptions]
  118.     set Status        = STATUS_FAILED
  119.     set OptionList     = {}
  120.     set OptionTextList = {}
  121.     set LanguageList = ^(LanguagesSupported, 1)
  122.     Ifcontains(i) $($0) in $(LanguageList)
  123.     ifstr(i) $($1) == ""
  124.         goto returnoptions
  125.     endif
  126.         set PlatformList = ^(PlatformsSupported, 1)
  127.     Ifcontains(i) $($1) in $(PlatformList)
  128.         goto returnoptions
  129.     else
  130.         set Status = STATUS_NOTSUPPORTED
  131.         goto finish_ReturnOptions
  132.     endif
  133.     else
  134.         set Status = STATUS_NOLANGUAGE
  135.         goto finish_ReturnOptions
  136.     endif
  137.  
  138. returnoptions = +
  139.     set OptionList     = ^(Options, 1)
  140.     set OptionTextList = ^(OptionsText$($0), 1)
  141.     set Status         = STATUS_SUCCESSFUL
  142.  
  143. finish_ReturnOptions = +
  144.     Return $(Status) $(OptionList) $(OptionTextList)
  145.  
  146. [InstallOption]
  147.     ;;;
  148.     ;;; Change "Set !G:DebugOutputControl=0" to 1 in NCAPSHEL.INF for debug support.
  149.     ;;;
  150.     ;;; set !G:DebugOutputControl=1     ;; Debug output {1=turned on, 0= turned off}
  151.     set Option   = $($1)
  152.     set SrcDir   = $($2)
  153.     set AddCopy  = $($3)
  154.     set DoCopy   = $($4)
  155.     set DoConfig = $($5)
  156.     set LanguageList = ^(LanguagesSupported, 1)
  157.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  158.     Return STATUS_NOLANGUAGE
  159.     endif
  160.     set-subst LF = "\n"
  161.     read-syms GeneralConstants
  162.     read-syms FileConstants
  163.     read-syms DialogConstants$(!STF_LANGUAGE)
  164.     ifstr(i) $(!NTN_Origination) == "NCPA"
  165.     set Continue = "OK"
  166.     endif
  167.     read-syms FileConstants$(!STF_LANGUAGE)
  168.     detect date
  169.     set-title  $(Function$(Option)Title)
  170.     set to   = Begin
  171.     set from = Begin
  172.     set CommonStatus = STATUS_SUCCESSFUL
  173.     EndWait
  174.  
  175. Begin = +
  176.     
  177.     ;;
  178.     ;; Get the Version of Windows NT we are installing on.  This will allow us to use the
  179.     ;; PCI Support that will be included in NT v3.51
  180.     ;;
  181.     set CurrentVersionValue = ""
  182.     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
  183.     Ifstr(i) $(KeyNt) != ""
  184.     GetRegValue $(KeyNt) "CurrentVersion" CurrentVersionValue
  185.     Debug-Output "$(InfFile) $(Option): WinNT CurrentVersion ="$(CurrentVersionValue)
  186.     CloseRegKey $(KeyNt)
  187.     Endif
  188.     
  189.     ifstr(i) (*($(CurrentVersionValue),4)) == $(NT310VersionConstant)    ;; NT v3.10 not supported!
  190.         Debug-Output "$(InfFile) $(Option): Configureadapter"
  191.     set Error = "Windows NT v3.10 is not support by this product"
  192.     goto fatal
  193.     endif
  194.     
  195.  
  196.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  197.         set StartLabel = removeadapter
  198.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  199.         set StartLabel = UpgradeSoftware
  200.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  201.         set StartLabel = bindingadapter
  202.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  203.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  204.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  205.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  206.             goto ShellCodeError
  207.             endif
  208.             set Error = $($R0)
  209.             set from = end
  210.             set to = end
  211.             goto nonfatalinfo
  212.         else
  213.             set StartLabel = configureadapter
  214.         endif
  215.     else
  216.         set StartLabel = installadapter
  217.         set OEM_ABANDON_OPTIONS = {}
  218.         set OEM_ABANDON_SOFTWARE = FALSE
  219.         set OEM_ABANDON_ON = TRUE
  220.     endif
  221.  
  222.     Debug-Output "$(InfFile) $(Option): =================================================="
  223.     Debug-Output "$(InfFile) $(Option): STF_CWDIR is: "$(!STF_CWDIR)
  224.     Debug-Output "$(InfFile) $(Option): STF_SRCDIR is: "$(!STF_SRCDIR)
  225.     Debug-Output "$(InfFile) $(Option): STF_LANGUAGE is: "$(!STF_LANGUAGE)
  226.     Debug-Output "$(InfFile) $(Option): Option is: "$(Option)
  227.     Debug-Output "$(InfFile) $(Option): !STF_NCN_InstallMode is:"$(!NTN_InstallMode)
  228.     Debug-Output "$(InfFile) $(Option): !STF_NCDETECT  is: "$(!STF_NCDETECT)
  229.     Debug-Output "$(InfFile) $(Option): !STF_NCOPTION  is: "$(!STF_NCOPTION)
  230.     Debug-Output "$(InfFile) $(Option): !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  231.     Debug-Output "$(InfFile) $(Option): !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  232.     Debug-Output "$(InfFile) $(Option): !STF_GUI_UNATTENDED is: "$(!STF_GUI_UNATTENDED)
  233.     Debug-Output "$(InfFile) $(Option): !STF_BusType is $(!STF_BUSTYPE)"            ;; Primary Bus
  234.     Debug-Output "$(InfFile) $(Option): !STF_BusTypeList is $(!STF_BUSTYPELIST)"    ;; All Buses
  235.     Debug-Output "$(InfFile) $(Option): =================================================="
  236.  
  237.     set from = $(fatal)
  238.     set to = $(fatal)
  239.     goto $(StartLabel)
  240.  
  241. installadapter = +
  242.     
  243.     Debug-Output "$(InfFile) $(Option): Installadapter"
  244.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  245.     Ifstr $(KeyProduct) != $(KeyNull)
  246.         CloseRegKey $(KeyProduct)
  247.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  248.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  249.                 Debug-Output "ShellCode error: cannot get an error string."
  250.                 goto ShellCodeError
  251.             endif
  252.             goto end
  253.         else
  254.             set OldVersionExisted = $(TRUE)
  255.         endif
  256.     Endif
  257.  
  258. ;;*** 
  259. ;; HACKHACK - Will copy when we have a help file!
  260. ;;     
  261. ;;  install "Install-Hlp"
  262. ;;
  263.     Goto adapteroptions    
  264.  
  265. configureadapter = +
  266.     Debug-Output "$(InfFile) $(Option): Configureadapter"
  267.  
  268.     set Error = "Cannot configure the software component"
  269.     goto fatal
  270.  
  271. adapteroptions = +
  272.     Debug-Output "$(InfFile) $(Option): Adapteroptions"
  273.     set from = adapteroptions
  274.     ifstr(i) $(!NTN_InstallMode) == configure
  275.        goto updateparameters
  276.     endif
  277.  
  278. installproduct =+
  279.     Debug-Output "$(InfFile) $(Option): installproduct"
  280.     StartWait 
  281.     set AdapterList = $($R1)
  282.     ifint $(OldVersionExisted) == $(FALSE)
  283.         Ifstr(i) $(DoCopy) == "YES"
  284.             Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
  285.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  286.                 Goto ShellCodeError
  287.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  288.                 Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  289.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  290.                     goto ShellCodeError
  291.                 endif
  292.                 set Error = $($R0)
  293.                 Goto fatal
  294.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  295.                 Goto successful
  296.             Endif
  297.             ;Set SrcDir = $($R1)
  298.         Endif
  299.  
  300.         install "Install-Option"
  301.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  302.             Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  303.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  304.                 goto ShellCodeError
  305.             endif
  306.             set Error = $($R0)
  307.             goto fatal
  308.         endif
  309.     endif
  310.  
  311.     ;
  312.     ; Check to see if the Product Software key exists already in the system service keys
  313.     ; before we try to add the software component.
  314.     ; 
  315.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_READ) KeyNt
  316.     CloseRegKey $(KeyNt)
  317.  
  318.     Ifstr(i) $(KeyNt) == ""
  319.         Debug-Output "$(InfFile) $(Option): AddSoftwareComponent"
  320.         Debug-Output "$(InfFile) $(Option): --> $(Manufacturer)"
  321.         Debug-Output "$(InfFile) $(Option): --> $(ProductSoftwareName)"
  322.         Debug-Output "$(InfFile) $(Option): --> $(ProductSoftwareTitle)"
  323.         Debug-Output "$(InfFile) $(Option): --> $(STF_CONTEXTINFNAME)"
  324.         Debug-Output "$(InfFile) $(Option): --> $(ProductSoftwareImagePath)"
  325.         Debug-Output "$(InfFile) $(Option): --> $(NetEventDLL)"
  326.  
  327.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  328.         $(ProductSoftwareName), +
  329.         $(ProductSoftwareName), +
  330.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  331.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  332.         $(NetEventDLL)
  333.         
  334.         Set OEM_ABANDON_SOFTWARE = TRUE
  335.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  336.             goto ShellCodeError
  337.         endif
  338.         set RegistryErrorIndex = $($R0)
  339.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  340.             EndWait
  341.             CloseRegKey $($R1)
  342.             CloseRegKey $($R2)
  343.             CloseRegKey $($R3)
  344.             CloseRegKey $($R4)
  345.             CloseRegKey $($R5)
  346.             goto fatalregistry
  347.         endif
  348.         Set SoftProductKey      = $($R1)
  349.         Set SoftNetRuleKey      = $($R2)
  350.         Set SoftServiceKey      = $($R3)
  351.         Set SoftParameterKey    = $($R4)
  352.         Set SoftLinkageKey      = $($R5)
  353.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  354.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  355.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  356.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  357.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  358.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  359.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  360.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  361.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  362.             goto ShellCodeError
  363.         endif
  364.         set RegistryErrorIndex = $($R0)
  365.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  366.             EndWait
  367.             CloseRegKey $(SoftProductKey)
  368.             CloseRegKey $(SoftNetRuleKey)
  369.             CloseRegKey $(SoftServiceKey)
  370.             CloseRegKey $(SoftParameterKey)
  371.             CloseRegKey $(SoftLinkageKey)
  372.             goto fatalregistry
  373.         endif
  374.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  375.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  376.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  377.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  378.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  379.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  380.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  381.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  382.             goto ShellCodeError
  383.         endif
  384.         set RegistryErrorIndex = $($R0)
  385.         CloseRegKey $(SoftProductKey)
  386.         CloseRegKey $(SoftNetRuleKey)
  387.         CloseRegKey $(SoftServiceKey)
  388.         CloseRegKey $(SoftParameterKey)
  389.         CloseRegKey $(SoftLinkageKey)
  390.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  391.             EndWait
  392.             goto fatalregistry
  393.         endif
  394.     endif ;; Does Services\el90x exist?
  395.     
  396.     Debug-Output "$(InfFile) $(Option): About to look for 3Com PCI Cards"
  397.     ;;
  398.     ;; We must be installing a PCI card.
  399.     ;; 
  400.     ;; Note: If we are are on WinNT v3.51 and above, we have PCI detection support 
  401.     ;; and are able to setup the adapter without user intervention. Otherwise, we can 
  402.     ;; only do one card at a time.
  403.     ;;
  404.     set TargetVersion = *($(CurrentVersionValue),4)
  405.     Debug-Output "$(InfFile) $(Option): Current Version:"$(TargetVersion)
  406.  
  407.     ifstr $(TargetVersion) == $(NT350VersionConstant)   ;; We need to ask on v3.50
  408.         Debug-Output "Running on WindowsNT 3.50"
  409.         set Version350 = $(TRUE)
  410.     else
  411.         Debug-Output "Running on WindowsNT 3.51"
  412.         set Version350 = $(FALSE)
  413.     endif
  414.  
  415.     ifint $(Version350) == $(TRUE)
  416.         Debug-Output "Running on WindowsNT v3.50, Not using PCI Detection!!!"
  417.         ifstr $(!STF_GUI_UNATTENDED) == "YES"
  418.             Debug-Output "$(InfFile) $(Option): Running in GUI unattended mode"
  419.             ifstr(i) $(!AutoNetInterfaceType) != ""
  420.                 set BusInterfaceType = $(!AutoNetInterfaceType)
  421.             else
  422.                 set BusInterfaceType = 5
  423.             endif
  424.             ifstr(i) $(!AutoNetBusNumber) != ""
  425.                 set BusNumber = $(!AutoNetBusNumber)
  426.             else
  427.                 set BusNumber = 0
  428.             endif
  429.             set NTDetected = $(FALSE)
  430.             set AdapterList = $(Option)   ;; 1 Item to install
  431.             Debug-Output "$(InfFile) $(Option): BusInterfaceType = $(BusInterfaceType)"
  432.             Debug-Output "$(InfFile) $(Option): BusNumber = $(BusNumber)"
  433.         else        
  434.             Debug-Output "$(InfFile) $(Option): Running 3.50 Bus Dialog"
  435.             set BusInterfaceType = 5
  436.             set BusNumber = 0
  437.             set NTDetected = $(FALSE)
  438.             Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  439.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  440.                 Debug-Output "ShellCode error."
  441.                 goto ShellCodeError
  442.             endif
  443.             set BusInterfaceType = $($R1)
  444.             set BusNumber = $($R2)
  445.             set AdapterList = $(Option)   ;; 1 Item to install
  446.             Debug-Output "$(InfFile) $(Option): BusInterfaceType = $(BusInterfaceType)"
  447.             Debug-Output "$(InfFile) $(Option): BusNumber = $(BusNumber)"
  448.         endif    
  449.     else
  450.         Debug-Output "$(InfFile) $(Option): Running 3.51 using PCI Dectection"
  451.         ;;
  452.         ;; v3.51 has PCI detection code built in.
  453.         ;;
  454.         ;;set BusInterfaceType = 5
  455.         ;;set BusNumber = 0
  456.         ;; Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  457.         
  458.         set NTDetected = $(TRUE)
  459.         set Vendor = 4279       ;; 0x10b7 is 3Com's Vendor ID!
  460.         set CFIDList = $($(Option)CFIDList)
  461.         Debug-Output "$(InfFile) $(Option): VendorID = $(Vendor)"
  462.         Debug-Output "$(InfFile) $(Option): CFIDList = $(CFIDList)"
  463.         set AdapterList = {}
  464.         ForListDo $(CFIDList)
  465.             set-div CFID = $($) 1
  466.             Shell $(UtilityInf), GetPCIInformation, $(Vendor) $(CFID)
  467.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  468.                 goto ShellCodeError
  469.             endif
  470.             ForListDo $($R0)
  471.                 set AdapterList = >($(AdapterList), $($))
  472.             EndForListDo
  473.         EndForListDo
  474.         ifstr(i) $(AdapterList) == {}
  475.             set Error = $(CANNOT_FIND_ANY_CARD)
  476.             set CommonStatus = USER_CANCEL
  477.             set from = end
  478.             goto nonfatal
  479.         endif
  480.     endif   ;;; NT v3.50
  481.  
  482.     ; "AdapterList" has the list of currently installed adatpers in the system!
  483.     ; 
  484.     Debug-Output "$(InfFile) $(Option): Adapterlist = $(AdatperList)"
  485.     ForListDo $(AdapterList)
  486.         Set InstallCard = "YES"
  487.         ifint $(NTDetected) == $(TRUE)
  488.             set DetectedBusNum = *($($),1)
  489.             set DetectedSlotNum = *($($),2)
  490.             Debug-Output "$(InfFile) $(Option): DetectedBusNumber = $(DetectedBusNum)"
  491.             Debug-Output "$(InfFile) $(Option): DetectedSlotNum = $(DetectedSlotNum)"
  492.  
  493.             Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(DetectedBusNum), +
  494.             $(DetectedSlotNum), $(ProductHardware$(Option)Description), $(ProductHardwareName)
  495.             
  496.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  497.                 goto ShellCodeError
  498.             endif
  499.             ifstr $($R0) != "NO_ERROR"
  500.                 set Error = $($R0)
  501.                 goto fatal
  502.             endif
  503.             ifstr(i) $($R1) == "YES"
  504.                 set InstallCard = "NO"  ;; Don't want to re-install, it's there already
  505.             endif    
  506.         endif
  507.         ;;
  508.         ;; Are we installing the card?
  509.         ;;
  510.         ifstr(i) $(InstallCard) == "NO"
  511.             Debug-Output "$(InfFile) $(Option): Card Already at $(DetectedBusNum):$(DetectedSlotNum) already installed!"
  512.             set Error = "An adapter at $(DetectedBusNum):$(DetectedSlotNum) is already installed!"
  513.             Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  514.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  515.                 goto ShellCodeError
  516.             endif
  517.         else
  518.             Debug-Output "$(InfFile) $(Option): Installing Card at $(DetectedBusNum):$(DetectedSlotNum)!"
  519.             Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  520.             ifint $($R4) != -1
  521.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  522.             endif
  523.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  524.                 goto ShellCodeError
  525.             endif
  526.             set RegistryErrorIndex = $($R0)
  527.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  528.                 EndWait
  529.                 CloseRegKey $($R1)
  530.                 CloseRegKey $($R2)
  531.                 CloseRegKey $($R3)
  532.                 goto fatalregistry
  533.             endif
  534.             Set HardNetCardKey      = $($R1)
  535.             Set HardNetRuleKey      = $($R2)
  536.             Set HardParameterKey    = $($R3)
  537.             set AdapterNumber = $($R4)
  538.             set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  539.                     {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  540.                     {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  541.                     {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  542.                     {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  543.                     {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  544.             Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  545.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  546.                 goto ShellCodeError
  547.             endif
  548.             ;
  549.             ; We are installing PCI
  550.             ;
  551.             set BusTypeNum = 5   
  552.             ifstr(i) $(Option) == "3C905"
  553.                 set CardType = 0
  554.             else
  555.                 set CardType = 2
  556.             endif    
  557.             ;;
  558.             ;; If we used the OS to dected the card, then we already know bus and slot information.
  559.             ;;        
  560.             ifint $(NTDetected) == $(TRUE)
  561.                 set BusNumber = $(DetectedBusNum)
  562.                 set SlotNum = $(DetectedSlotNum)    
  563.                 set BusInterfaceType = $(BusTypeNum)
  564.                 ;
  565.                 ; Note: we need to record SlotNumber too so that we can use the 
  566.                 ; "IsNetCardAlreadyInstalled" routine
  567.                 ;
  568.                 Set NewValueList =  {+
  569.                     {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  570.                     {Slot,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}+
  571.                     }
  572.                 Debug-Output "$(InfFile) $(Option): Set HardwareParameterKey = $(NewValueList)"
  573.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  574.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  575.                     goto ShellCodeError
  576.                 endif
  577.  
  578.                 Set NewValueList = { {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)} }
  579.                 Debug-Output "$(InfFile) $(Option): Set HardwareParameterKey = $(NewValueList)"
  580.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  581.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  582.                     goto ShellCodeError
  583.                 endif
  584.             else
  585.                 Set NewValueList =  {+
  586.                     {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  587.                     }
  588.                 Debug-Output "$(InfFile) $(Option): Set HardwareParameterKey = $(NewValueList)"
  589.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  590.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  591.                     goto ShellCodeError
  592.                 endif
  593.             endif
  594.  
  595.             Set NewValueList =  {+
  596.                 {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  597.                 {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardType)},+
  598.                 {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  599.                 }
  600.  
  601.             Debug-Output "$(InfFile) $(Option): Set HardwareParameterKey = $(NewValueList)"
  602.             Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  603.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  604.                 goto ShellCodeError
  605.             endif
  606.  
  607.             set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  608.             set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  609.             set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  610.                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  611.                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  612.                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  613.     
  614.             Debug-Output "$(InfFile) $(Option): HardwareRuleKey = $(NewValueList)"
  615.             Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  616.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  617.                 goto ShellCodeError
  618.             endif
  619.             CloseRegKey $(HardNetCardKey)
  620.             CloseRegKey $(HardNetRuleKey)
  621.             CloseRegKey $(HardParameterKey)
  622.         endif    
  623.     EndForListDo
  624.     EndWait
  625.     goto successful
  626.  
  627. updateparameters =+
  628.     Debug-Output "$(InfFile) $(Option): Updateparameters"
  629.     set HardParameterKey    = $($R3)
  630.     
  631.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  632.     goto ShellCodeError
  633.     endif
  634.     CloseRegKey $(KeyParameters)
  635.     goto successful
  636.  
  637. bindingadapter =+
  638.     Debug-Output "$(InfFile) $(Option): bindingadapter"
  639.     set Error = "Binding: Sorry, not yet implemented."
  640.     goto fatal
  641.  
  642. removeadapter = +
  643.     Debug-Output "$(InfFile) $(Option): removeadapter"
  644.     Debug-Output "$(InfFile) $(Option): ----> $(ProductKeyName), $(!NTN_RegBase)"
  645.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  646.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  647.         $(ProductSoftwareName)
  648.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  649.         goto ShellCodeError
  650.         endif
  651.         set RegistryErrorIndex = $($R0)
  652.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  653.         goto fatalregistry
  654.     endif
  655.     else
  656.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  657.         $(ProductSoftwareName), $(!NTN_RegBase)
  658.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  659.         goto ShellCodeError
  660.     endif
  661.     set RegistryErrorIndex = $($R0)
  662.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  663.         goto fatalregistry
  664.     endif
  665.     endif
  666.     goto end
  667.  
  668. UpgradeSoftware = +
  669.     Debug-Output "$(InfFile) $(Option): UpdateSoftware"
  670.      OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  671.      Ifstr $(KeyProduct) != $(KeyNull)
  672.        Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  673.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  674.            Debug-Output "ShellCode error"
  675.            goto ShellCodeError
  676.        endif
  677.        set !UG_Filename = $($R0)
  678.        install "Install-Update"
  679.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  680.            goto fatal
  681.        endif
  682.        SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  683.        SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  684.        CloseRegKey $(KeyProduct)
  685.      else
  686.        goto fatalregistry
  687.      endif
  688.      goto end
  689.  
  690. successful = +
  691.     Debug-Output "$(InfFile) $(Option): Successful"
  692.     goto end
  693.  
  694. abandon = +
  695.     Debug-Output "$(InfFile) $(Option): Abandon"
  696.     ForListDo $(OEM_ABANDON_OPTIONS)
  697.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  698.         $(ProductSoftwareName), $($)
  699.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  700.         goto ShellCodeError
  701.     endif
  702.     set RegistryErrorIndex = $($R0)
  703.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  704.         goto fatalregistry
  705.     endif
  706.     EndForListDo
  707.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  708.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  709.         $(ProductSoftwareName), FALSE
  710.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  711.         goto ShellCodeError
  712.     endif
  713.     set RegistryErrorIndex = $($R0)
  714.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  715.         goto fatalregistry
  716.     endif
  717.     endif
  718.     goto end
  719.  
  720. warning = +
  721.     Debug-Output "$(InfFile) $(Option): warning"
  722.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  723.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  724.     goto ShellCodeError
  725.     endif
  726.     ifstr(i) $($R1) == "OK"
  727.     goto $(to)
  728.     else-ifstr(i) $($R1) == "CANCEL"
  729.     goto $(from)
  730.     else
  731.     goto "end"
  732.     endif
  733.  
  734. nonfatalinfo = +
  735.     Debug-Output "$(InfFile) $(Option): nonfatalinfo"
  736.     Set CommonStatus = STATUS_USERCANCEL
  737.     Set Severity = STATUS
  738.     goto nonfatalmsg
  739.  
  740. nonfatal = +
  741.     Debug-Output "$(InfFile) $(Option): nonfatal"
  742.     Set Severity = NONFATAL
  743.     goto nonfatalmsg
  744.  
  745. nonfatalmsg = +
  746.     Debug-Output "$(InfFile) $(Option): nonfatalmsg"
  747.     ifstr(i) $(Error) == ""
  748.     Set Severity = NONFATAL
  749.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  750.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  751.         goto ShellCodeError
  752.     endif
  753.     set Error = $($R0)
  754.     endif
  755.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  756.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  757.     goto ShellCodeError
  758.     endif
  759.     ifstr(i) $($R1) == "OK"
  760.     goto $(from)
  761.     else
  762.     ;   goto "end"
  763.     goto "RemoveAdapter"
  764.     endif
  765.  
  766. fatalregistry = +
  767.     Debug-Output "$(InfFile) $(Option): fatalregistry"
  768.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  769.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  770.     goto ShellCodeError
  771.     endif
  772.     set Error = $($R0)
  773.     goto fatal
  774.  
  775. fatal = +
  776.     Debug-Output "$(InfFile) $(Option): fatal"
  777.     ifstr(i) $(Error) == ""
  778.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  779.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  780.         goto ShellCodeError
  781.     endif
  782.     set Error = $($R0)
  783.     endif
  784.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  785.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  786.     goto ShellCodeError
  787.     endif
  788.     goto setfailed
  789.  
  790. ShellCodeError = +
  791.     Debug-Output "$(InfFile) $(Option): ShellCodeError"
  792.     set DlgType      = "MessageBox"
  793.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  794.     set STF_MB_TEXT  = $(ShellCodeErrorText) 
  795.     set STF_MB_TYPE  = 1
  796.     set STF_MB_ICON  = 3
  797.     set STF_MB_DEF   = 1
  798.     ui start "Error Message"
  799.     goto setfailed
  800.  
  801. setfailed = +
  802.     Debug-Output "$(InfFile) $(Option): Setfailed"
  803.     set CommonStatus = STATUS_FAILED
  804.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  805.     set OEM_ABANDON_ON = FALSE
  806.     goto abandon
  807.     endif
  808.     goto end
  809.  
  810. end = +
  811.     goto term
  812.  
  813. term = +
  814.     Return $(CommonStatus)
  815.     
  816. [Install-Option]
  817.     set STF_VITAL = ""
  818.     ifstr(i) $(AddCopy) == "YES"
  819.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  820.     endif
  821.     ifstr(i) $(DoCopy) == "YES"
  822.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  823.        CopyFilesInCopyList
  824.     endif
  825.     Exit
  826.     
  827. [Install-Hlp]
  828.    set STF_VITAL = ""
  829.    AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  830.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  831.    CopyFilesInCopyList
  832.    Exit
  833.    
  834. [Install-Update]
  835.    set STF_VITAL    = ""
  836.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  837. ;; HACKHACK - Will copy when we have a help file!
  838. ;; AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  839.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  840.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  841.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  842.    CopyFilesInCopyList
  843.    exit
  844.  
  845. [Source Media Descriptions]
  846.     1  = "Windows NT Setup Disk #1"  
  847.     2  = "3Com Etherdisk for Fast EtherLink XL / EtherLink XL Adapters"
  848.  
  849. [Signature]
  850.     FileType = MICROSOFT_DRVLIB_FILE
  851. [GetSignature]
  852.     read-syms Signature
  853.     return $(FileType)
  854.  
  855. [ProductType]
  856. STF_PRODUCT  = Winnt
  857. STF_PLATFORM = I386
  858.  
  859. [Files-Inf]
  860. 2, oemsetup.inf,    SIZE=1000,     RENAME=$(!UG_Filename)
  861.  
  862. [Files-Hlp]
  863. 2,3C90x.hlp , SIZE=88888
  864.  
  865. ;
  866. ; Driver files
  867. ;
  868. [Files-3C905]
  869. 2,EL90x.SYS , SIZE=88888
  870. [Files-3C900]
  871. 2,EL90x.SYS , SIZE=88888
  872.  
  873. [LanguagesSupported]
  874.     ENG
  875.  
  876. [OptionsTextENG]
  877.     3C905   = "3Com Fast EtherLink XL Adapter (3C905)"
  878.     3C900   = "3Com EtherLink XL Adapter (3C900)"
  879.     
  880. [FileConstantsENG]
  881.     ProCaption   = "Windows NT v3.5 Setup"
  882.     ProCancel    = "Cancel"
  883.     ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  884.                "Are you sure you want to cancel copying files?"
  885.     ProCancelCap = "Network Setup Message"
  886.     ProText1     = "Copying:"
  887.     ProText2     = "To:"
  888.  
  889. ConnectionList  = ^(ConnectionChoices$(Option), 1)
  890. ConnectionValues = ^(ConnectionChoices$(Option), 2)
  891. NoList  = ^(NoChoices, 1)
  892. NoValues = ^(NoChoices, 2)
  893. ShellCodeErrorTitle = "Error: "$(Function$(Option)Title)
  894. ShellCodeErrorText  = "Shell Code Error."
  895. CANNOT_FIND_ANY_CARD    = "Network card is not present in the system"
  896.  
  897. [DialogConstantsENG]
  898. Help        = "&Help"
  899. Exit        = "Cancel"
  900. OK      = "OK"
  901. HelpContext = ""
  902. Continue    = "Continue"
  903. Cancel      = "Cancel"
  904.